# Who represents the constituency? Online political communication by members of parliament in the German mixed-member electoral system

The materials provided here enable the replication of the paper "Who represents the constituency? Online political communication by members of parliament in the German mixed-member electoral system" published in Legislative Studies Quarterly. The archive contains R scripts and data files.


## R scripts

script | description
1_prepare_data.R | Script that documents the text analysis and preprocessing steps. 
2_regression_analysis.R | Script for running regressions and printing their output. 
3_online_appendix.Rmd | R Markdown file for creating the Online Appendix. 


## Data

Data to reproduce the results are provided in the folder `Data`. The data files are read into the R scripts where appropriate. 

The raw social media data cannot be shared due to the terms and conditions of Facebook and Twitter. These datasets can be reconstructed by researchers: 
* The Facebook posts of MPs can be retrieved from CrowdTangle (https://www.crowdtangle.com), a data insights tool owned by Facebook that tracks the posts of public Facebook pages. CrowdTangle is accessible for academic researchers after a per-user authorization process. The list of MPs' Facebook accounts in `Data/fb_accounts.rds` can be used to get their posts from CrowdTangle.
* The tweets of MPs can be reconstructed using the tweet IDs provided in `Data/tweet_ids.rds.`


## Folders

Folder | Content
--
Data | Data files
Helper | Files for compiling the R Markdown file `3_online_appendix.Rmd`.


## Software statement
All analyses were run in R, version 4.1.1. 
